package com.aorise.model.request;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import java.util.List;

/**
 * @Auther: zhouhao
 * @Date: 2019/5/27
 * @Description:
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value="addRole对象",description="添加角色对象")
public class AddRoleReq {

    @ApiModelProperty(value = "角色名",example = "123",dataType = "string")
    @Length(min = 2,max = 20,message = "角色名不能为空且长度需要在2和20之间")
    String roleName;

    @ApiModelProperty(value = "权限集合",example = "[2,3,5,6,7]",dataType = "list")
    List<Integer> permissions;

    @ApiModelProperty(value = "token")
    private String token;

}
